This invention relates in general to compression of digital images, and more particularly, to a technique for programmably controlling output of compressed data from, for example, a video encoding system.
Technological advances in digital transmission networks, digital storage media, very large scale integration devices, and digital processing of video and audio signals have been converging to make the transmission and storage of digital video economical in a wide variety of applications. Because the storage and transmission of digital video signals is central to many applications, and because an uncompressed representation of a video signal requires a large amount of storage, the use of digital video compression techniques is vital to this advancing art. In this regard, several international standards for the compression of digital video signals have emerged over the past decade, with more currently under development. These standards apply to algorithms for the transmission and storage of compressed digital video in a variety of applications, including: video-telephony and teleconferencing; high quality digital television transmission on coaxial and fiberoptic networks, as well as broadcast terrestrially and other direct broadcast satellites; and in interactive multimedia products on CD-ROM, Digital Audio Tape, and Winchester disk drives.
Several of these standards involve algorithms based on a common core of compression techniques, e.g., the CCITT (Consultative Committee on International Telegraphy and Telephony) Recommendation H.120, the CCITT Recommendation H.261, and the ISO/IEC MPEG-1 and MPEG-2 standards. The MPEG algorithms have been developed by the Moving Picture Experts Group (MPEG), part of a joint technical committee of the International Standards Organization (ISO) and the International Electrotechnical Commission (IEC). The MPEG committee has been developing standards for the multiplexed, compressed representation of video and associated audio signals.
The MPEG-2 standard describes an encoding method that results in substantial bandwidth reduction by a subjective lossy compression followed by a lossless compression. The encoded, compressed digital data is subsequently decompressed and decoded in an MPEG-2 compliant decoder. The MPEG-2 standard specifies a very high compression technique that achieves compression not achievable with intraframe coding alone, while preserving the random access advantages of pure intraframe coding. The combination of frequency domain intraframe encoding and interpolative/predictive interframe encoding of the MPEG-2 standard results in a balance between intraframe encoding and interframe encoding.
The ISO MPEG-2 Compression Standard specifies only the syntax of bitstream and semantics of the decoding process. The choice of coding parameters and trade-offs in performance versus complexity are left to the encoder developer.
The compressed output of an MPEG-2 encoder is conventionally provided at an irregular rate. Typically, bursts of data are output for short durations between which there are long periods of time when no data is output. The output rate characteristics are mostly dependent on the encoding parameters and the source of video data being encoded. Conventionally, a video encode system contains large first-in first-out (FIFO) buffer devices downstream from the encoder output in order to capture the compressed stream and hold the data for transmission to a next component in the system. The size of these FIFO devices is determined by considering the worst case output rate of the encoder coupled with the worst case (i.e., slowest) read rate of the next component of the system. This estimate needs to be conservative since losing compressed output could produce an invalid MPEG stream and cause notable artifacts when the stream is decoded and displayed. The high speed, dense FIFO devices that are typically used in these systems can be quite expensive.
In view of this, there is a need in the art for enhanced approaches to handling and controlling encoder output.
The shortcomings of the prior art are overcome and additional advantages are provided through the provision of a method of controlling output of compressed data from an encoder. The method includes: buffering the compressed data in a write buffer; transferring the compressed data from the write buffer to a read buffer; and providing a plurality of programmable output modes for selectively controlling output of the compressed data held in the read buffer of the encoder.
In an enhanced aspect, the transferring includes moving compressed data from the write buffer to the read buffer until the read buffer is full, then writing blocks of compressed data from the write buffer to an external memory of the encoder. Thereafter, a block of data is written from the external memory to the read buffer whenever the read buffer has sufficient space to accept the block of compressed data. An outstanding block count is used by a controller of the write buffer and the read buffer to determine when to write data to and read data from the external memory.
As a further enhancement, the plurality of programmable output modes can include at least one of a slave mode, a gated master mode, a multiple cycle speed mode, and a paced master mode. Additionally, the method may include detecting an indicator in the compressed data and responsive thereto padding bytes of data prior to output of the compressed data. In one implementation, the indicator could comprise an illegal or invalid start code. The padding of bytes of data proceeds until the pad count associated with the illegal start code is exhausted.
Systems and computer program products corresponding to the above-summarized methods are also described and claimed herein.
Advantageously, techniques are provided for controlling output of compressed data from an encoder. Control is facilitated by providing a plurality of programmable output modes for selectively controlling the timing and presentation of the compressed data output of the encoder. Buffers are provided within the encoder to allow for this programmable output mode control. By buffering compressed data within the encoder and, for example, producing a compressed data output at a regular rate, the need for dense external FIFOs is either minimized or eliminated depending upon the application. Further, the buffers and programmable output modes presented could be configured to hold compressed data until a user specifically requests the data from the encoder. In another mode, output timing could be extended to multiple encoder cycles, thus allowing the attachment of slower, less expensive FIFOs, or other inexpensive memory.
Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered a part of the claimed invention.